package com.sky.mapper;

import com.sky.entity.OrderDetail;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: HuoXu
 * @Date: 2023/09/03/22:40
 * @Description: 快乐跳跳虎
 */
@Mapper
public interface OrderDetilMapper {

    void setOrderDetail(ArrayList<OrderDetail> orderDetailArrayList);

    /**
     * 查询订单明细
     * @param id
     * @return
     */
    @Select("select * from order_detail where order_id=#{id}")
    List<OrderDetail> getByOrderId(Long id);

    /**
     * 删除订单详细表的数据
     * @param id
     */
    @Delete("delete from order_detail where order_id=#{id}")
    void cancelOrderDetil(Long id);


}
